package com.jzx.provider;

import com.jzx.provider.cv.service.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

/**
 * jar 运行时加载词库
 */
@Component
@Slf4j
public class MyStartUpRunner implements CommandLineRunner {
    @Autowired
    private UniversityService universityService;

    @Autowired
    private KeyWordService keyWordService;

    @Autowired
    private MajorService majorService;

    @Autowired
    private ComNameService comService;

    @Autowired
    private TitleService titleService;

    @Override
    public void run(String... args) throws Exception {
        universityService.createDir();
        log.info("高校加载完成");

        keyWordService.createDir();
        log.info("关键字和技能加载完成");

        majorService.createDir();
        log.info("专业加载完成");

        comService.createDir();
        log.info("常用公司加载完成");

        titleService.createDir();
        log.info("常用职位名称加载完成");
    }
}
